package in.iqing.model.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by neavo on 2014/9/8.
 */

public class Page implements Serializable {
	public static final int TYPE_CONTENT = 1;
	public static final int TYPE_ILLUSTRATION = 2;
	private int start;
	private int end;
	private int index;
	private int type;
	private List<String> lines;

	public Page(int start, int end) {
		this.start = start;
		this.end = end;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public List<String> getLines() {
		return lines;
	}

	public void setLines(List<String> lines) {
		this.lines = lines;
	}

	public void addLine(String line) {
		if (lines == null) {
			lines = new ArrayList<>();
		}

		lines.add(line);
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getEnd() {
		return end;
	}

	public void setEnd(int end) {
		this.end = end;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	@Override
	public String toString() {
		return "Page{" +
				"start=" + start +
				", end=" + end +
				", index=" + index +
				", type=" + type +
				", lines=" + lines +
				'}';
	}
}
